package cn.bistu.cs.haroldweather.db;

import org.litepal.crud.LitePalSupport;

import cn.bistu.cs.haroldweather.gson.Weather;

public class WeatherInfo extends LitePalSupport {
    public String status;
    public String province;
    public String distraction;
    public String city;
    public String adcode;
    public String updateTime;
    public String humidity;
    public String temperature;
    public String winddirection;
    public String info;
    public WeatherInfo(){}
    public WeatherInfo(Weather weather){
        this.status = weather.status;
        this.province = weather.basic.province;
        this.distraction = weather.basic.distractionName;
        this.city = weather.basic.city;
        this.adcode = weather.basic.weatherId;
        this.updateTime = weather.basic.update.updateTime;
        this.humidity = weather.now.humidity;
        this.temperature = weather.now.temperature;
        this.winddirection = weather.now.winddirection;
        this.info = weather.now.more.info;
    }
    public WeatherInfo(String status, String province, String distraction, String city, String weatherId, String updateTime, String humidity, String temperature, String winddirection, String info) {
        this.status = status;
        this.province = province;
        this.distraction = distraction;
        this.city = city;
        this.adcode = weatherId;
        this.updateTime = updateTime;
        this.humidity = humidity;
        this.temperature = temperature;
        this.winddirection = winddirection;
        this.info = info;
    }

    @Override
    public String toString() {
        return "WeatherInfo{" +
                "status='" + status + '\'' +
                ", province='" + province + '\'' +
                ", distraction='" + distraction + '\'' +
                ", city='" + city + '\'' +
                ", adcode='" + adcode + '\'' +
                ", updateTime='" + updateTime + '\'' +
                ", humidity='" + humidity + '\'' +
                ", temperature='" + temperature + '\'' +
                ", winddirection='" + winddirection + '\'' +
                ", info='" + info + '\'' +
                '}';
    }
}
